/*
 * Reflexis is Copyright (C) 2007, by it-raum.ch
 * martin.imobersteg@it-raum.ch
 *
 * It is free software; you can redistribute it and/or modify it under the terms of either:
 * a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
 * b) the "Artistic License".
 */

#ifndef REFLEXIS_H
#define REFLEXIS_H

#define REFLEXIS_VERSION "1.0"

#include "ui_reflexis.h"
#include "Probe.h"

#include <QtGui>

class ProbeReader;
class ProbeWriter;
class SettingsDialog;

class Reflexis : public QWidget, private Ui::ReflexisForm
{

	Q_OBJECT

public:
	Reflexis(QWidget *parent = 0);
	~Reflexis();

protected:
	void closeEvent(QCloseEvent *event);

private slots:
	void iconActivated(QSystemTrayIcon::ActivationReason reason);
	void probeReady(Probe probe);
	void writeProbe();
	void cancelProbe();
	void showSettings();
	void about();

	void debug();

private:
	void createTrayIcon();
	void setVisible(bool visible);

	Probe m_probe;
	ProbeReader *m_reader;
	ProbeWriter *m_writer;
	SettingsDialog *m_settings;

	QSystemTrayIcon *m_trayIcon;
	QMenu *m_trayIconMenu;

	QAction *m_quitAction;
	QAction *m_settingsAction;
	QAction *m_connectAction;

	QAction *m_debugAction;

};

#endif // REFLEXIS_H 
